package com.ncepu.clubmanagement.utils;

import org.springframework.web.multipart.MultipartFile;

public interface FileSaveUtils {


    // 流式文件上传，返回上传后文件的地址/路径，如果上传失败，返回null
    public String upload(MultipartFile file, String path);
    public boolean delete(String path);

    public String upload(MultipartFile file, String path, String fileName);

    public String generateFileUrl(String path, String fileName);

    // 可以自指定name，path，url等
    public String upload(MultipartFile file, String path, String fileName, String customUrl);

    public  boolean replaceFile(String sourceUrl, String destinationUrl);  // 替换文件逻辑
}
